package com.brillilab.service.utils;

public class NumberToLetterUtil {

	public static String numberToLetter(int num) {
		if (num <= 0) {
			return null;
		}
		String letter = "";
		num--;
		do {
			if (letter.length() > 0) {
				num--;
			}
			letter = ((char) (num % 26 + (int) 'a')) + letter;
			num = (int) ((num - num % 26) / 26);
		} while (num > 0);

		return letter;
	}
	
}
